<html>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style>
.bang:hover
{
	text-decoration: underline;
	background:-webkit-linear-gradient(#00CD00,#006400);
}
#table1
{
border: 1px;
background : -webkit-linear-gradient(#00CD00,#008B00);
}
#table2
{
border: cadetblue;
background : -webkit-linear-gradient(#00CD00,#008B00);
color: #CDCDB4;
}
#btn_show
{
-webkit-border-top-right-radius:6px;
-webkit-border-top-left-radius:6px;
background: -webkit-linear-gradient(#C6E2FF,#6C7B8B);
color:#F5F5F5;
border-width:0px;
}
#btn_show:hover
{
background : -webkit-linear-gradient(#B9D3EE,#9FB6CD);
}
#btn_show:active
{
position:relative;
top:1.2px;
left:1px;
}
</style>
<body>
<form id="form1"name="form1"method="post"action="BangCuuChuongMoRong.php">
<table id="table1"align="center"border="1.3px"cellspacing="0.7px"cellpadding="1px">
	<tr>
		<td colspan="2" align="center">BẢNG CỬU CHƯƠNG</td>
	</tr>
	
	<tr>
		<td>Bắt đầu Từ: </td>
		<td><label><input id="bd"name="bd"type="text"value="<?php
			if(isset($_POST["bd"]))
			{
				echo $_POST["bd"];
			}
		?>"/></label></td>
	</tr>
	
	<tr>
		<td>đến: </td>
		<td><label><input id="kt"name="kt"type="text"value="<?php
			if(isset($_POST["kt"]))
			{
				echo $_POST["kt"];
			}
		?>"/></label></td>
		
	</tr>
	
	<tr>
		<td colspan="2" align="center"><label><input id="btn_show" type="submit"value="hiện bảng cửu chương"/></label></td>
	</tr>
</table>



</form>


<?php
if(isset($_POST["bd"]) && isset($_POST["kt"]))
{
	$bd = $_POST["bd"];
	$kt = $_POST["kt"];
	if(is_numeric($bd) && is_numeric($kt))
	{
		$chuoi = "";
		echo "<table  id='table2' border='1' align='center'>";
		echo "<tr background-color='#cee7ff' bordercolor='#003300'>";
			for($i = $bd; $i <= $kt; $i++)
			{
				echo "<td class='bang' width='110px'>";
				for($j = 1; $j <= 10;$j++)
				{
					echo "$i x $j = ".$i*$j. "<br>";
				}
				echo "</td>";
			}
			echo "</tr>";
			echo "</table>";
	}
	else
	{
		echo "<table  border='1' align='center'>";
		echo "<tr background-color='#cee7ff' bordercolor='#003300'>";
		echo "<td>";
		echo "phải nhập số đó con t*";
		echo "</td>";
		echo "</tr>";
		echo "</table>";
	}
}
?>
</body>
</html>